package work;

/**
 * @TODO
 * @Author xu
 * 2025/2/24
 */
public class Day3_13 {
    public static void main(String[] args) {
        for (int roosterCount = 0; roosterCount <= 20; roosterCount++) {
            for (int henCount = 0; henCount <= 33; henCount++) {
                int chickCount = 100 - roosterCount - henCount;
                if (chickCount >= 0 && chickCount % 3 == 0) {

                    double cost = roosterCount * 5 + henCount * 3 + chickCount / 3.0;
                    if (cost == 100) {
                        System.out.printf("公鸡: %d 只, 母鸡: %d 只, 小鸡: %d 只%n", roosterCount, henCount, chickCount);
                    }
                }
            }
        }

    }
}